<%@page pageEncoding="utf-8" contentType="text/html; charset=utf-8"%>
<%@taglib prefix="s" uri="strutsTags"%>
<%@taglib prefix="ty" uri="/wyzzTags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<head>
	<base href="<%=basePath%>">
	<link href="resource/css/style.css" rel="stylesheet" type="text/css" />
	<jsp:include flush="true" page="../sitemesh/jsPackage.jsp"></jsp:include>
	<script type="text/JavaScript" src="resource/js/hrm/profile.js"></script>
	<title>奖惩记录</title>
</head>
<body onload="hrm.common.check_order();">
	<ty:auth auths="101">
		<s:set name="hasAuth" value="'has'" />
	</ty:auth>
	<s:component template="bodyhead" />

	<form action="profile/listReward.action" id="listForm" method="post">
		<table width="100%" class="formtable">
			<tr>
				<s:textfield id="employeeId" label="员工" name="employeeId" size="16"
					maxlength="64" />
				<td align="right">
					执行组织:
				</td>
				<td>
					<s:orgselector id="orgselector2" name="departmentName"
						hiddenFieldName="departmentId" isShowDisable="show" />
				</td>
				<td align="right">
					奖惩种类:
				</td>
				<td>
					<s:select name="erType" id="erType" list="erTypeMap"
						onchange="model.simple.changeSubSelect(this,'erForm','erTypeSubMap')">
					</s:select>
					&nbsp;&nbsp;形式:
					<select name="erForm" id="erForm"></select>
				</td>
				<td rowspan="2">
					<input title="[Alt+F]" accesskey="F" name="submit_search"
						id="submit_search" class="button" type="submit" value="查询">
					<input title="[Alt+A]" accesskey="A" name="submit_all"
						id="submit_all" class="button" type="reset" value="重置"
						onclick="window.location='listReward.action'">
				</td>
			</tr>
			<tr>
				<td align="right">
					所属组织:
				</td>
				<td>
					<s:orgselector id="orgselector1" name="deptName"
						hiddenFieldName="deptId" isShowDisable="show" />
				</td>
				<s:textfield id="erContent" label="备注" name="erContent" size="16"
					maxlength="64" />
				<td align="right">
					奖惩日期:
				</td>
				<td>
					<s:textfield id="erExeDate" name="erExeDate" size="10"
						maxlength="10" />
					<img onclick="WdatePicker({el:'erExeDate'})" class="dateimg"
						src="resource/js/My97DatePicker/skin/datePicker.gif">
					到
					<s:textfield id="erExeDateTo" name="erExeDateTo" size="10"
						maxlength="10" />
					<img onclick="WdatePicker({el:'erExeDateTo'})" class="dateimg"
						src="resource/js/My97DatePicker/skin/datePicker.gif">
				</td>
			</tr>
		</table>

		<!-- 操作 -->
		<div class="operatediv">
			<input type="hidden" name="searchOrExport" id="searchOrExport" />
			<s:hidden id="output-ommId" name="outmatchModelId" />
			<s:hidden id="output-ioName" name="outputIoName" />
			<span class="operatedivleft"> <ty:auth auths="101,2 or 101,3">
					<input class="button" type="button"
						onclick="initDivImmUpload('IEmpreward');" value="数据导入" />
					<input id="btnOutput" class="button" type="button" value="数据导出"
						onclick="HRMCommon.export_check('export');" />
				</ty:auth> </span>
			<span class="operatedivright">本次查询共得到<s:property
					value="page.totalRows" />条奖惩记录</span>
		</div>

		<table cellpadding="0" cellspacing="0" width="100%" border="0"
			class="gridtableList">
			<s:hidden id="order" name="page.order" />
			<s:hidden id="operate" name="page.operate" />
			<s:hidden id="page.currentPage" name="page.currentPage" />
			<tr>
				<th nowrap="nowrap">
					<a
						onclick="hrm.common.order_submit('emp.empDistinctNo', 'listForm');">员工编号</a>
					<img src='resource/images/arrow_.gif' width='8' height='10'
						id='emp.empDistinctNo_img'>
				</th>
				<th nowrap="nowrap">
					<a onclick="hrm.common.order_submit('emp.empName', 'listForm');">员工姓名</a>
					<img src='resource/images/arrow_.gif' width='8' height='10'
						id='emp.empName_img'>
				</th>
				<th nowrap="nowrap">
					<a onclick="hrm.common.order_submit('erExeDate', 'listForm');">奖惩日期</a>
					<img src='resource/images/arrow_.gif' width='8' height='10'
						id='erExeDate_img'>
				</th>
				<th nowrap="nowrap">
					<a
						onclick="hrm.common.order_submit('department.departmentName', 'listForm');">执行部门</a>
					<img src='resource/images/arrow_.gif' width='8' height='10'
						id='department.departmentName_img'>
				</th>
				<th nowrap="nowrap">
					<a onclick="hrm.common.order_submit('erPbNo.pbName', 'listForm');">职位</a>
					<img src='resource/images/arrow_.gif' width='8' height='10'
						id='erPbNo.pbName_img'>
				</th>
				<th nowrap="nowrap">
					<a onclick="hrm.common.order_submit('erType', 'listForm');">种类</a>
					<img src='resource/images/arrow_.gif' width='8' height='10'
						id='erType_img'>
				</th>
				<th nowrap="nowrap">
					<a onclick="hrm.common.order_submit('erForm', 'listForm');">形式</a>
					<img src='resource/images/arrow_.gif' width='8' height='10'
						id='erForm_img'>
				</th>
				<th nowrap="nowrap">
					<a onclick="hrm.common.order_submit('erContent', 'listForm');">备注</a>
					<img src='resource/images/arrow_.gif' width='8' height='10'
						id='erContent_img'>
				</th>
			</tr>
			<tbody>
				<s:if test="!rewardList.isEmpty()">
					<s:iterator value="rewardList">
						<tr id="<s:property value='erId'/>">
							<td>
								<s:property value="employee.empDistinctNo" />
							</td>
							<td>
								<s:property value="employee.empName" />
							</td>
							<td>
								<s:property value="erExeDate" />
							</td>
							<td>
								<s:property value="department.departmentName" />
							</td>
							<td>
								<s:property value="erPbNo.pbName" />
							</td>
							<td>
								<s:property value="erTypeMean" />
							</td>
							<td>
								<s:property value="erForm" />
							</td>
							<td>
								<s:property value="erContent" />
							</td>
						</tr>
					</s:iterator>
				</s:if>
				<s:else>
					<tr>
						<td colspan="10" align="center">
							无相关奖惩记录！
						</td>
					</tr>
				</s:else>
			</tbody>
		</table>
		<s:pager end="page.end" pageNo="page.currentPage"
			totalRows="page.totalRows" totalPages="page.totalPages"
			formId="listForm" start="page.start" />
	</form>
	<jsp:include flush="true" page="../io/div_omm_select.jsp"></jsp:include>
	<script type="text/javascript">
erTypeSubMap={};
erTypeSubMap={};
<s:iterator value="erFormMap" id="topEntrySet">
	erTypeSubMap['<s:property value="#topEntrySet.key"/>']={};
	<s:iterator value="#topEntrySet.value" status="index" id="secEntrySet">
		<s:if test="#secEntrySet.key.length()==0">
			erTypeSubMap['<s:property value="#topEntrySet.key"/>']['']='<s:property value="#secEntrySet.value"/>';
		</s:if><s:else>
			erTypeSubMap['<s:property value="#topEntrySet.key"/>']['<s:property value="#secEntrySet.value"/>']=
				'<s:property value="#secEntrySet.value"/>';
		</s:else>
	</s:iterator>
</s:iterator>
model.simple.changeSubSelect('erType','erForm','erTypeSubMap','<s:property value="erForm"/>');
model.simple.setParentIFrameFull("IFrame1"); 
</script>
	<jsp:include flush="true" page="../io/div_upload.jsp"></jsp:include>
</body>
